/**
 * API响应的统一格式
 */
export interface ApiResponse<T = any> {
  code: number;
  message: string;
  data: T;
}

/**
 * 分页响应数据
 */
export interface PaginatedResponse<T> {
  list: T[];
  total: number;
  page: number;
  pageSize: number;
}

/**
 * 分页请求参数
 */
export interface PaginationParams {
  page?: number;
  pageSize?: number;
  [key: string]: any;
}

/**
 * 通用响应状态码
 */
export enum ResponseCode {
  SUCCESS = 200,
  UNAUTHORIZED = 401,
  FORBIDDEN = 403,
  NOT_FOUND = 404,
  SERVER_ERROR = 500,
}

/**
 * 文件上传响应
 */
export interface UploadResponse {
  url: string;
  filename: string;
  size: number;
  mimeType: string;
}

// 验证码响应数据
export interface CaptchaResponse {
  captcha: number;
  expiresIn: number;
}

// 登录响应数据
export interface LoginResponse {
  accessToken: string;
  refreshToken: string;
}

// 刷新token响应数据
export interface RefreshTokenResponse {
  accessToken: string;
} 
// 拖拉拽
// export interface CanvasSize {
//   width: number;
//   height: number;
// }
// 
// export interface Category {
//   id: string;
//   name: string;
//   icon: string;
// }